/*
 * Copyright (c) 2019.11，华乘电气科技有限公司
 * All rights reserved.
 *
 * 文件名称：tevspectrumprivate.h
 * 
 * 初始版本：1.0
 * 作者：洪澄
 * 创建日期：2019/11/08
 * 摘要：TEV图谱数据私有定义
 * 当前版本：1.0
 */

#pragma once

#include <QString>
#include <vector>

namespace DataSpecificationGW
{
    struct TEVAmpExtInformationPrivate
    {
        friend class TEVAmpSpectrum;

        quint8 ucAmpUnit;
        float fAmpLowerLimit;
        float fAmpUpperLimit;

        void skipAmpUnit() { bSkipAmpUnit = true; }
        void skipAmpLowerLimit() { bSkipAmpLowerLimit = true; }
        void skipAmpUpperLimit() { bSkipAmpUpperLimit = true; }

        bool hasAmpUnit() const { return bHasAmpUnit; }
        bool hasAmpLowerLimit() const { return bHasAmpLowerLimit; }
        bool hasAmpUpperLimit() const { return bHasAmpUpperLimit; }

        TEVAmpExtInformationPrivate();
        TEVAmpExtInformationPrivate& operator=(const TEVAmpExtInformationPrivate& stTEVAmpExtInformationPrivate);
        bool operator==(const TEVAmpExtInformationPrivate& stTEVAmpExtInformationPrivate) const;

    private:
        bool bSkipAmpUnit;
        bool bSkipAmpLowerLimit;
        bool bSkipAmpUpperLimit;

        bool bHasAmpUnit;
        bool bHasAmpLowerLimit;
        bool bHasAmpUpperLimit;
    };

    struct TEVAmpDataPrivate
    {
        friend class TEVAmpSpectrum;

        float fTEVAmpValue;
        float fTEVMaxValue;
        qint32 iPulseCount;
        float fSeverity;
        QString qstrBGFileName;
        quint8 ucDischargeSeverity;

        void skipTEVAmpValue() { bSkipTEVAmpValue = true; }
        void skipTEVMaxValue() { bSkipTEVMaxValue = true; }
        void skipPulseCount() { bSkipPulseCount = true; }
        void skipSeverity() { bSkipSeverity = true; }
        void skipBGFileName() { bSkipBGFileName = true; }
        void skipDischargeSeverity() { bSkipDischargeSeverity = true; }

        bool hasTEVAmpValue() const { return bHasTEVAmpValue; }
        bool hasTEVMaxValue() const { return bHasTEVMaxValue; }
        bool hasPulseCount() const { return bHasPulseCount; }
        bool hasSeverit() const { return bHasSeverity; }
        bool hasBGFileName() const { return bHasBGFileName; }
        bool hasDischargeSeverity() const { return bHasDischargeSeverity; }

        TEVAmpDataPrivate();
        TEVAmpDataPrivate& operator=(const TEVAmpDataPrivate& stTEVAmpDataPrivate);
        bool operator==(const TEVAmpDataPrivate& stTEVAmpDataPrivate) const;

    private:
        bool bSkipTEVAmpValue;
        bool bSkipTEVMaxValue;
        bool bSkipPulseCount;
        bool bSkipSeverity;
        bool bSkipBGFileName;
        bool bSkipDischargeSeverity;

        bool bHasTEVAmpValue;
        bool bHasTEVMaxValue;
        bool bHasPulseCount;
        bool bHasSeverity;
        bool bHasBGFileName;
        bool bHasDischargeSeverity;
    };
}
